setHtmlFontSize()
import debounce from 'lodash.debounce'
function setHtmlFontSize() {
  // 1920是设计稿的宽度，当大于1920时采用1920宽度，比例也是除以19.2
  var deviceWidth = document.documentElement.clientWidth
  // 1920/19.2  = 100
  if (deviceWidth < 1200) {
    deviceWidth = 1200
  }
  var html = document.getElementsByTagName('html')[0]
  html.style.fontSize = `${deviceWidth / 19.2}px`
}

window.addEventListener('resize', debounce(setHtmlFontSize, 250))
